<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>Calibrate lens gui - PanoTools.org Wiki</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="generator" content="MediaWiki 1.23.6" />






<style media="screen" type="text/css" title="Screen style sheet"> @import url(manual.css); </style>

<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
/* cache key: panotools_wiki:resourceloader:filter:minify-css:7:90730a7865ba4b50e0b837e1821ff0a3 */</style>



<!--[if lt IE 7]><style type="text/css">body{behavior:url("/skins/vector/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Calibrate_lens_gui skin-vector action-view vector-animateLayout">
		
		
		<div id="content" class="mw-body" role="main">
			<a id="top"></a>
			
						<h1 id="firstHeading" class="firstHeading" lang="en"><span dir="auto">Calibrate lens gui</span></h1>
						<div id="bodyContent">
								<div id="siteSub">From PanoTools.org Wiki</div>
								
												
				<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p>calibrate_lens_gui is a tool for lens calibration using the straight line approach.
</p>
<h1><span class="mw-headline" id="Workflow">Workflow</span></h1>
<p>1. Load images
</p><p>2. Check focal length and crop factor (calibrate_lens_gui tries to read them from the EXIF data)
</p><p>3. Detect lines
</p><p>4. Optimize the lens parameters
</p><p>5. Save optimized lens parameters into file for using inside Hugin
</p>
<h1><span class="mw-headline" id="Line_detection">Line detection</span></h1>
<p>To speed up the following calculations the image is scaled down, so that the longest dimension of the image is small than maximal image size.
</p><p>Then an edge detection operator is applied. The <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Canny_edge_detector">Canny edge detector</a> is used for this. This step can be tuned with the scale or radius factor and the threshold for the Canny edge detector. 
</p><p>Finally the found lines are checked if they are straight in respect to the given focal length. Also lines with are shorter than the minimal line length are rejected. Minimum line length is given as ratio to the image width/height. So a value of 0.3 means that only lines which are longer than 30&#160;% of the image width are used.
</p>
<h1><span class="mw-headline" id="Preview">Preview</span></h1>
<ul>
<li> Original: Shows the original image as loaded from the disc.
</li>
<li> Edge detection: Shows the result of the Canny edge detector. Useful for tweaking the scale and threshold parameters that good lines are found.
</li>
<li> Corrected: Shows the image corrected with the current lens parameters. If you manually edit these values you need to press Refresh so see the effect of the modified parameters.
</li>
</ul>
<p><b>Show lines</b>: This will blend the detected lines into the image. Valid lines are drawn in green. Invalid lines (e.g. too short or too curved) are drawn in black - these lines are not always visible. 
</p><p>With the left mouse button you can mark lines to be not used for the optimisation (e.g. if the automatic detection was not perfect and selected also bad lines). Lines which are ignored by the the optimiser are drawn in red. If you want these lines to be used by the optimiser again click with the right mouse button on these lines.
</p>



</div>								<div class="printfooter">
				Retrieved from "http://wiki.panotools.org/index.php?title=Calibrate_lens_gui&amp;oldid=13517<a class="external" href="http://wiki.panotools.org/index.php?title=Calibrate_lens_gui&amp;oldid=13517">[*]</a>"				</div>
												</div></div></body></html>